/**
 * 
 */
package tt.lab.pmbok.action;

import java.util.List;

import tt.lab.pmbok.model.Inout;
import tt.lab.pmbok.model.PmbokProcess;
import tt.lab.pmbok.model.ProcessInout;
import tt.lab.pmbok.model.ProcessTool;
import tt.lab.pmbok.model.Tool;
import tt.lab.pmbok.service.ProcessService;


public class ProcessAction  {
	private int processId;
	private int toolId;
	private int inoutId;
	private int groupId;
	private int areaId;
	
	private ProcessService processService;
	
	private PmbokProcess process;
	private List<PmbokProcess> processes;
	private Tool tool;
	private Inout inout;
	
	public String execute(){
		processes = processService.loadByGroupArea(0, 0);

		return "index";
	}
	
	
	
	public String loadByGroupArea(){
		processes = processService.loadByGroupArea(groupId, areaId);
		return "index";
	}
	
	public String process(){
		process = processService.load(processId);
		
		return "process";
	}
	
	public String tool(){
		tool = processService.loadTool(toolId);
		return "tool";
	}
	
	public String inout(){
		setInout(processService.loadInout(inoutId));
		return "inout";
	}
	
	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}
	public int getGroupId() {
		return groupId;
	}
	public void setAreaId(int areaId) {
		this.areaId = areaId;
	}
	public int getAreaId() {
		return areaId;
	}
	public void setProcessService(ProcessService processService) {
		this.processService = processService;
	}
	public ProcessService getProcessService() {
		return processService;
	}
	public void setProcesses(List<PmbokProcess> processes) {
		this.processes = processes;
	}
	public List<PmbokProcess> getProcesses() {
		return processes;
	}

	
	public void setProcess(PmbokProcess process) {
		this.process = process;
	}

	public PmbokProcess getProcess() {
		return process;
	}



	public void setTool(Tool tool) {
		this.tool = tool;
	}



	public Tool getTool() {
		return tool;
	}



	public void setToolId(int toolId) {
		this.toolId = toolId;
	}



	public int getToolId() {
		return toolId;
	}



	public void setInoutId(int inoutId) {
		this.inoutId = inoutId;
	}



	public int getInoutId() {
		return inoutId;
	}



	public void setInout(Inout inout) {
		this.inout = inout;
	}



	public Inout getInout() {
		return inout;
	}



	public void setProcessId(int processId) {
		this.processId = processId;
	}



	public int getProcessId() {
		return processId;
	}
	
}
